home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_levernowork.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  109 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shs_TowerGates.cog     Make the gates btwn the towers open/close.  
  4. #
  5. # [JWC, RD]
  6. #
  7. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13. message     activated
  14.  
  15. keyframe    indypull=in_pull_lever.key            local
  16. keyframe    leverDown=gen_lever_pull.key        local
  17.  
  18. sound        leverPull=nub_lever_pull_c.wav        local
  19. sound        leverBack=nub_lever_reset_c.wav        local
  20.  
  21.  
  22. thing        player                local
  23. thing        indy                nolink
  24. thing        cam1
  25. thing        lever
  26. thing        c1_t1            # Indy        
  27.  
  28. int            curCam                local
  29.  
  30. cog            NoWorkTalkCog
  31.  
  32. end
  33.  
  34. # ========================================================================================
  35.  
  36. code
  37.  
  38.  
  39. activated:
  40.    
  41.     if (GetSenderRef() != lever) return;
  42.     
  43.     # Prep for cutscene...
  44.     SetActorFlags(player, 0x200000);    # paralyze him
  45.     StartCutscene(1);
  46.     curCam = GetCurrentCamera();        
  47.     player = GetLocalPlayerThing();
  48.     
  49.     # Disable and hide player...
  50.     StopThing(player);                    # right now
  51.     PlayMode(player, 1, 0);                # get him into a nice stand
  52.     DeselectWeaponWait(player);            # stow any weapon or lighter
  53.     CopyPlayerHolsters(player, indy);    # make sure our actor has matching props
  54.     Sleep(0.5);                            # give him some time to do his stuff
  55.     
  56.     # Switch actor indy for player...
  57.     
  58.     SetThingFlags(player, 0x80000);        # hide him
  59.     ClearThingFlags(indy, 0x80000);        # reveal our actor
  60.                                
  61.     # Prep camera & cut...
  62.     SetCameraLookInterp(2, 0);            # kill pan & tilt to lock on 2nd target
  63.     SetCameraPosInterp(2, 0);            # kill dolly mode too
  64.     SetCameraFocus(2, cam1);
  65.     SetCameraSecondaryFocus(2, c1_t1);
  66.     Sleep(0.01);
  67.     SetCurrentCamera(2);
  68.     ResetCameraFOV(0, 0.0);
  69.     SetCameraFOV(55, 0, 0.0);
  70.    
  71.     # Indy pulls lever
  72.     PlayKey(indy, indyPull, 4, 0x12, 0);
  73.     PlayKey(lever, leverDown, 4, 0x12, 0);
  74.     Sleep(1.2);
  75.     PlaySoundLocal(leverPull, 1.0, 0, 0x0000, 0);
  76.     Sleep(1.4);
  77.     PlaySoundLocal(leverBack, 1.0, 0, 0x0000, 0);
  78.     Sleep(0.3);
  79.  
  80.     # Call NoWorkTalkCog
  81.     SendMessageEx(NoWorkTalkCog, user1, indy, 0, 0, 0);
  82.     global15 = 0; # per Randy
  83.     while (global15 == 0)
  84.     {
  85.         Sleep(0.01); # wait for line to finish
  86.     }
  87.     
  88.     
  89.     # Return control and camera to player
  90.     CopyOrientAndPos(indy, player); # move player to actor's spot
  91.     SetThingFlags(indy, 0x80000);
  92.     SetCameraPosition(1, GetThingPos(cam1));    # prep for camera to swing back
  93.     ClearThingFlags(player, 0x80000);
  94.     SetCameraLookInterp(2, 0); # kill pan & tilt mode
  95.     SetCameraPosInterp(2, 0); # kill dolly mode
  96.     Sleep(0.01);
  97.     SetCurrentCamera(curCam);
  98.     ResetCameraFOV(0, 0.0);
  99.     EndCutscene();
  100.     ClearActorFlags(player, 0x200000);
  101.     
  102.     return; 
  103.  
  104. end
  105.     
  106.     
  107.     
  108.  
  109.